package com.molihub.service.impl;

import com.molihub.entity.Friend;
import com.molihub.entity.User;
import com.molihub.service.FriendService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @ClassName: FriendServiceImpl
 * @Description: TODO
 * @author: GGBOY
 * @date 2020/2/15 18:15
 * @Version: 1.0
 **/
@Service
public class FriendServiceImpl extends BaseService implements FriendService {
    @Override
    public Friend findRecordById(Integer userId, Integer friendId) {
        return friendMapper.findRecordById(userId, friendId);
    }

    @Override
    public void addRecord(Friend friend) {
        friendMapper.addRecord(friend);
    }

    @Override
    public List<User> findAllFriendById(Integer userId) {
        return friendMapper.findAllFriendById(userId);
    }

    @Override
    public Integer getFriendsCount(Integer userId) {
        return friendMapper.getFriendsCount(userId);
    }

    @Override
    public List<Friend> findAllRecordById(Integer userId) {
        return friendMapper.findAllRecordById(userId);
    }
}
